//#include <stdio.h>
//int main()
//{
//	int aa[2][5] = { 10,9,8,7,6,5,4,3,2,1 };
//	int* ptr1 = (int*)(&aa + 1);
//	int* ptr2 = (int*)(*(aa + 1));
//	printf("%d,%d", *(ptr1 - 1), *(ptr2 - 1));
//	return 0;
//}
//#define  _CRT_SECURE_NO_WARNINGS
//
//#include <stdio.h>
//#include <string.h>
//
//int main()
//{
//	char str1[] = "abcd.fghce;fgh@";
//	/*printf(strstr(str1, str2));*/
//	char str2[] = " .;@";
//	char* arr = NULL;
//	for (arr = strtok(str1,str2); arr != NULL; arr = strtok(NULL, str2))
//	{
//		printf("%s ", arr);
//	};
//	return 0;
//}
#include <stdio.h>
#include <string.h>
size_t my_strlen(char* p1)
{
	size_t cont = 0;
	while (*p1 != '\0')
	{
		cont++;
		p1++;
	}
	return cont;
}
char *  my_strcpy(char* str2, char* str1)
{
	char* arr = str2;
	while (*str1 != '\0')
	{
		*str2 = *str1;
		str2++;
		str1++;
	}
	*str2 = '\0';
	return arr;
}
int my_strcmp(char* p1, char* p2)
{
	while (*p1 != '\0' || *p2 != '\0')
	{
		if (*p1 == *p2)
		{
			p1++;
			p2++;
		}
		else
		{
			return *p1 - *p2;
		}
	}
	return 0;
}
char* my_strcat(char* def, char* sourc)
{
	char* def1 = def;
	int len = strlen(def);
	def1 = def1 + len;
	while (*sourc != '\0')
	{
		*def1 = *sourc;
		sourc++;
		def1++;
	}
	*def1 = '\0';
	return def;
}
int main()
{
	char arr[10] = "abc";
	char str[] = "def";
	printf(my_strcat(arr, str));
}
//int main()
//{
//	char arr[] = "abcd";
//	char str[] = "abc";
//	printf("%d ", my_strcmp(arr, str));
//	return 0;
//}
//int main()
//{
//	char arr[] = "acbdad";
//	char str[7] = { 0 };
//	my_strcpy(str, arr);
//	printf(str);
//	return 0;
//
//}